<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="f" uri="/nvl"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>添加产品</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript">
	//alert("a");
	$(document).ready(function() {
		var bheight = document.body.clientHeight;
		$("#showchoosetypewindow").click(function() {
			$("#brg").css("display", "block");
			$("#showdiv").css("display", "block");
			$("#testdiv").load("test.html");
		});
		$("#close").click(function() {
			$("#brg").css("display", "none");
			$("#showdiv").css("display", "none");
			//$("#testdiv").load("");
		});
	});
</script>
		<style type="text/css">
#brg {
	width: 100%;
	height: 100%;
	background: #333;
	position: absolute;
	top: 0;
	left: 0;
	filter: alpha(opacity = 60);
	-moz-opacity: 0.6;
	opacity: 0.6;
	position: absolute;
	top: 0;
	left: 0;
	display: none;
}

#showdiv {
	width: 100%;
	height: auto;
	position: absolute;
	left: 0;
	top: 0;
	z-index: 20;
	display: none;
}

#testdiv {
	width: 600px;
	height: 400px;
	margin: 0 auto;
	border: 1px solid #4d4d4d;
	background: #f2f2f2;
}

#close {
	width: 200px;
	height: 27px;
	line-height: 27px;
	font-size: 14px;
	font-weight: bold;
	border: 1px solid #4d4d4d;
	text-align: center;
	cursor: pointer;
	margin: 0 auto;
	background: #333;
	color: #fff;
}

.btn {
	margin: 20px auto auto 20px;
	width: 200px;
	height: 27px;
	line-height: 27px;
	font-size: 14px;
	font-weight: bold;
	border: 1px solid #4d4d4d;
	text-align: center;
	cursor: pointer;
}
</style>
	</head>

	<body>
		<%--<div id="lay" class="btn">点击我弹出一个层哦</div>
 --%>
		<div id="brg"></div>
		<div id="showdiv">
			<div id="close">
				关闭
			</div>
			<div id="testdiv">
				很简单的谈出层背景变暗效果，欢迎拍砖啊
			</div>
		</div>
		<s:form namespace="/product" enctype="multipart/form-data"
			action="add" method="post" theme="simple">
			<table>
				<tr>
					<td>
						<s:label for="product.name" value="产品名称"></s:label>
					</td>
					<td>
						<input type="text" name="product.name" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.productType" value="产品类别"></s:label>
					</td>
					<td>
						<input type="text" name="product.productType" />
						<input id="showchoosetypewindow" type="button" value="选择..." />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.basePrice" value="底价"></s:label>
					</td>
					<td>
						<input type="text" name="product.basePrice" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.marketPrice" value="市场价"></s:label>
					</td>
					<td>
						<input type="text" name="product.marketPrice" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.sellPrice" value="销售价"></s:label>
					</td>
					<td>
						<input type="text" name="product.sellPrice" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.code" value="货号"></s:label>
					</td>
					<td>
						<input type="text" name="product.code" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label value="产品图片"></s:label>
					</td>
					<td>
						<s:label value="样式名称: "></s:label>
						<input type="text" name="product.styles[0].name" />
						<s:label value="样式图片: "></s:label>
						<input type="file" name="psDto.file" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.brand" value="添加品牌"></s:label>
					</td>
					<td>
						<s:select list="brands" name="brand" headerKey="-1"
							headerValue="请选择品牌" listKey="brand.id" listValue="brand.name"></s:select>
						<s:a>添加品牌</s:a>
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.sexRequest" value="适用性别"></s:label>
					</td>
					<td>
						<s:select list="@com.tbyfsoft.bean.common.Sex@values()"
							name="product.sexRequest" listValue="name" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.model" value="型号"></s:label>
					</td>
					<td>
						<input type="text" name="product.model" />
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.weight" value="重量"></s:label>
					</td>
					<td>
						<input type="text" name="product.weight" />
						克
					</td>
				</tr>
				<tr>
					<td>
						<s:label for="product.visible" value="是否可见"></s:label>
					</td>
					<td>
						<input type="checkbox" name="product.visible" />
					</td>
				</tr>

				<tr>
					<td>
						<input type="submit" value="添加" />
					</td>
				</tr>
			</table>
		</s:form>
	</body>
</html>
